package com.huashi.dealer.modular.business.upload.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * 图片库VO
 */
@Data
@Schema(description = "图片库VO")
public class ImageLibraryVo {

    @Schema(description = "分组列表")
    private List<GroupVo> groupList;

    @Schema(description = "文件列表")
    private FileListVo fileList;

    @Data
    @Schema(description = "分组VO")
    public static class GroupVo {
        @Schema(description = "分组ID")
        private Long groupId;

        @Schema(description = "分组名称")
        private String groupName;

        @Schema(description = "排序")
        private Integer sort;

        @Schema(description = "是否默认选中")
        private Boolean isDefault;
    }

    @Data
    @Schema(description = "文件列表VO")
    public static class FileListVo {
        @Schema(description = "文件列表")
        private List<FileItemVo> records;

        @Schema(description = "当前页")
        private Integer current;

        @Schema(description = "最后一页")
        private Integer pages;

        @Schema(description = "总记录数")
        private Long total;

        @Schema(description = "每页记录数")
        private Long size;
    }

    @Data
    @Schema(description = "文件项VO")
    public static class FileItemVo {
        @Schema(description = "文件ID")
        private Long fileId;

        @Schema(description = "文件名称")
        private String fileName;

        @Schema(description = "文件别名")
        private String alias;

        @Schema(description = "文件路径")
        private String filePath;

        @Schema(description = "文件URL")
        private String fileUrl;

        @Schema(description = "文件大小")
        private Long fileSize;

        @Schema(description = "文件类型")
        private String fileType;

        @Schema(description = "分组ID")
        private Long groupId;

        @Schema(description = "创建时间")
        private Long createTime;
    }
}
